package com.example.ass7.sprite;

import java.awt.Color;

import com.example.ass7.geometryprimitives.Counter;
import com.example.ass7.level.GameLevel;

import biuoop.DrawSurface;

/**
 * @author Meirav Ben Izhak
 */
public class LivesIndicator implements Sprite {

    private final Counter numberOfLives;

    /**
     * @param numberOfLives
     *            numberOfLives
     */
    public LivesIndicator(
        Counter numberOfLives) {
        this.numberOfLives = numberOfLives;
    }

    @Override
    public void drawOn(DrawSurface d) {
        d.setColor(Color.BLACK);
        d.drawText(100, 20, "Lives: "
                + this.numberOfLives.getValue(), 15);
    }

    @Override
    public void timePassed(double dt) {
        // empty
    }

    /**
     * @param addTo
     *            addTo
     */
    public void addToGame(GameLevel addTo) {
        addTo.addSprite(this);
    }

}
